import Vue from 'vue'
import VueRouter from 'vue-router'
import MyIndex from '../views/MyIndex.vue'
import MyNews from '../views/MyNews.vue'
import MySport from '../views/MySport.vue'
import SportIndex from '../views/children/SportIndex.vue'
import ChSport from '../views/children/ChSport.vue'
import WaSport from '../views/children/WaSport.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/'

    },
    {
        path: '/myindex',
        component: MyIndex
    },
    {
        path: '/mynews',
        component: MyNews
    },
    {
        path: '/mysport',
        component: MySport,
        children: [
            {
                path: 'sportindex',
                component: SportIndex
            },
            {
                path: 'chinasport',
                component: ChSport
            },
            {
                path: 'aboutsport',
                component: WaSport
            }
        ]
    }
]


const router = new VueRouter({
    routes
})

export default router